FROM elasticsearch:6.5.0

#配置跨域
RUN echo -e "http.cors.enabled: true\nhttp.cors.allow-origin: \"*\"" >> /usr/share/elasticsearch/config/elasticsearch.yml

#下载ik插件
RUN su
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v6.5.0/elasticsearch-analysis-ik-6.5.0.zip

#端口
EXPOSE 9200
EXPOSE 9300